package com.qys.livesMall.finance.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qys.livesMall.finance.model.dto.AccountDetailSearch;
import com.qys.livesMall.finance.model.dto.AccountInOut;
import com.qys.livesMall.finance.model.dto.shop.EveryDayIncome;
import com.qys.livesMall.finance.model.dto.user.UserInfoTeamIncomeDTO;
import com.qys.livesMall.finance.model.entity.shop.FinanceShopAccountDetail;
import com.qys.livesMall.finance.model.vo.AppUserInfoTeamIncomeVO;
import com.qys.livesMall.framework.mapper.QysBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 店铺余额明细 Mapper 接口
 * </p>
 *
 * @author
 * @since 2023-06-06
 */
@Mapper
public interface FinanceShopAccountDetailMapper extends QysBaseMapper<FinanceShopAccountDetail, AccountDetailSearch> {

    AccountInOut sum(@Param("search") AccountDetailSearch search);

    Page<AppUserInfoTeamIncomeVO> getShopListIncome(@Param("page")Page<AppUserInfoTeamIncomeVO> page,@Param("dto") UserInfoTeamIncomeDTO dto);

    BigDecimal getCumulativeIncome(@Param("userId") Long userId,@Param("codes") List<String> codes,@Param("type") Integer type);

    List<EveryDayIncome> getEveryDayIncome(@Param("shopId") Long shopId);

    List<FinanceShopAccountDetail> getYesterday(Integer userSysType);
}
